home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Windows 1993 Fall / TestDrive Windows 1993 Fall.iso / opro / omniscan.smm < prev    next >
INI File  |  1992-02-03  |  9KB  |  938 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     HP LaserJet III
  13. [lang]
  14.     1
  15. [desc]
  16.     
  17.     
  18.     
  19.     
  20.     
  21.     697168752
  22.     26
  23.     688759401
  24.     138
  25.     2
  26.     0
  27.     0
  28.     0
  29.     0
  30.     
  31.     
  32.     
  33.     
  34.     
  35.     
  36.     0
  37. [fopts]
  38.     0
  39.     1
  40.     0
  41.     0
  42. [lnopts]
  43.     2
  44.     Body Text
  45.     1
  46. [docopts]
  47.     5
  48.     2
  49. [tag]
  50.     Body Text
  51.     2
  52.     [fnt]
  53.         Courier
  54.         240
  55.         0
  56.         32768
  57.     [algn]
  58.         1
  59.         1
  60.         0
  61.         0
  62.         0
  63.     [spc]
  64.         33
  65.         273
  66.         1
  67.         0
  68.         0
  69.         1
  70.         100
  71.     [brk]
  72.         4
  73.     [line]
  74.         8
  75.         0
  76.         1
  77.         0
  78.         1
  79.         1
  80.         1
  81.         10
  82.         10
  83.         1
  84.     [spec]
  85.         0
  86.         0
  87.         
  88.         0
  89.         1
  90.         1
  91.         0
  92.         0
  93.         0
  94.         0
  95.     [nfmt]
  96.         272
  97.         1
  98.         2
  99.         .
  100.         ,
  101.         $
  102.     Body Text
  103.     0
  104.     0
  105. [tag]
  106.     Body Single
  107.     3
  108.     [fnt]
  109.         Tms Rmn
  110.         240
  111.         0
  112.         49152
  113.     [algn]
  114.         1
  115.         1
  116.         0
  117.         0
  118.         0
  119.     [spc]
  120.         33
  121.         273
  122.         1
  123.         0
  124.         0
  125.         1
  126.         100
  127.     [brk]
  128.         4
  129.     [line]
  130.         8
  131.         0
  132.         1
  133.         0
  134.         1
  135.         1
  136.         1
  137.         10
  138.         10
  139.         1
  140.     [spec]
  141.         0
  142.         0
  143.         
  144.         0
  145.         1
  146.         1
  147.         0
  148.         0
  149.         0
  150.         0
  151.     [nfmt]
  152.         272
  153.         1
  154.         2
  155.         .
  156.         ,
  157.         $
  158.     Body Single
  159.     0
  160.     0
  161. [tag]
  162.     Bullet 1
  163.     4
  164.     [fnt]
  165.         Tms Rmn
  166.         240
  167.         0
  168.         49152
  169.     [algn]
  170.         1
  171.         1
  172.         720
  173.         360
  174.         360
  175.     [spc]
  176.         33
  177.         273
  178.         1
  179.         144
  180.         0
  181.         1
  182.         100
  183.     [brk]
  184.         4
  185.     [line]
  186.         8
  187.         0
  188.         1
  189.         0
  190.         1
  191.         1
  192.         1
  193.         10
  194.         10
  195.         1
  196.     [spec]
  197.         0
  198.         0
  199.         <*0>
  200.         360
  201.         1
  202.         1
  203.         0
  204.         0
  205.         0
  206.         0
  207.     [nfmt]
  208.         272
  209.         1
  210.         2
  211.         .
  212.         ,
  213.         $
  214.     Bullet 1
  215.     0
  216.     0
  217. [tag]
  218.     Bullet 2
  219.     5
  220.     [fnt]
  221.         Tms Rmn
  222.         240
  223.         0
  224.         49152
  225.     [algn]
  226.         1
  227.         1
  228.         1080
  229.         360
  230.         360
  231.     [spc]
  232.         33
  233.         273
  234.         1
  235.         144
  236.         0
  237.         1
  238.         100
  239.     [brk]
  240.         4
  241.     [line]
  242.         8
  243.         0
  244.         1
  245.         0
  246.         1
  247.         1
  248.         1
  249.         10
  250.         10
  251.         1
  252.     [spec]
  253.         0
  254.         0
  255.         <*2>
  256.         360
  257.         1
  258.         1
  259.         0
  260.         0
  261.         0
  262.         0
  263.     [nfmt]
  264.         272
  265.         1
  266.         2
  267.         .
  268.         ,
  269.         $
  270.     Bullet 2
  271.     0
  272.     0
  273. [tag]
  274.     Indent 1
  275.     6
  276.     [fnt]
  277.         Tms Rmn
  278.         240
  279.         0
  280.         49152
  281.     [algn]
  282.         1
  283.         1
  284.         1080
  285.         0
  286.         0
  287.     [spc]
  288.         33
  289.         273
  290.         1
  291.         144
  292.         0
  293.         1
  294.         100
  295.     [brk]
  296.         4
  297.     [line]
  298.         8
  299.         0
  300.         1
  301.         0
  302.         1
  303.         1
  304.         1
  305.         10
  306.         10
  307.         1
  308.     [spec]
  309.         0
  310.         0
  311.         
  312.         0
  313.         1
  314.         1
  315.         0
  316.         0
  317.         0
  318.         0
  319.     [nfmt]
  320.         272
  321.         1
  322.         2
  323.         .
  324.         ,
  325.         $
  326.     Indent 1
  327.     0
  328.     0
  329. [tag]
  330.     Indent 2
  331.     7
  332.     [fnt]
  333.         Tms Rmn
  334.         240
  335.         0
  336.         49152
  337.     [algn]
  338.         1
  339.         1
  340.         1440
  341.         0
  342.         0
  343.     [spc]
  344.         33
  345.         273
  346.         1
  347.         144
  348.         0
  349.         1
  350.         100
  351.     [brk]
  352.         4
  353.     [line]
  354.         8
  355.         0
  356.         1
  357.         0
  358.         1
  359.         1
  360.         1
  361.         10
  362.         10
  363.         1
  364.     [spec]
  365.         0
  366.         0
  367.         
  368.         0
  369.         1
  370.         1
  371.         0
  372.         0
  373.         0
  374.         0
  375.     [nfmt]
  376.         272
  377.         1
  378.         2
  379.         .
  380.         ,
  381.         $
  382.     Indent 2
  383.     0
  384.     0
  385. [tag]
  386.     Number List
  387.     8
  388.     [fnt]
  389.         Tms Rmn
  390.         240
  391.         0
  392.         49152
  393.     [algn]
  394.         1
  395.         1
  396.         720
  397.         360
  398.         360
  399.     [spc]
  400.         33
  401.         273
  402.         1
  403.         144
  404.         0
  405.         1
  406.         100
  407.     [brk]
  408.         4
  409.     [line]
  410.         8
  411.         0
  412.         1
  413.         0
  414.         1
  415.         1
  416.         1
  417.         10
  418.         10
  419.         1
  420.     [spec]
  421.         0
  422.         0
  423.         <*:>.
  424.         360
  425.         1
  426.         1
  427.         0
  428.         0
  429.         0
  430.         0
  431.     [nfmt]
  432.         272
  433.         1
  434.         2
  435.         .
  436.         ,
  437.         $
  438.     Number List
  439.     0
  440.     0
  441. [tag]
  442.     Bold & Center
  443.     9
  444.     [fnt]
  445.         Tms Rmn
  446.         240
  447.         0
  448.         49153
  449.     [algn]
  450.         4
  451.         1
  452.         0
  453.         0
  454.         0
  455.     [spc]
  456.         33
  457.         273
  458.         1
  459.         0
  460.         144
  461.         1
  462.         100
  463.     [brk]
  464.         4
  465.     [line]
  466.         8
  467.         0
  468.         1
  469.         0
  470.         1
  471.         1
  472.         1
  473.         10
  474.         10
  475.         1
  476.     [spec]
  477.         0
  478.         0
  479.         
  480.         0
  481.         1
  482.         1
  483.         0
  484.         0
  485.         0
  486.         0
  487.     [nfmt]
  488.         272
  489.         1
  490.         2
  491.         .
  492.         ,
  493.         $
  494.     Bold & Center
  495.     0
  496.     0
  497. [tag]
  498.     First Indent
  499.     11
  500.     [fnt]
  501.         Tms Rmn
  502.         240
  503.         0
  504.         49152
  505.     [algn]
  506.         1
  507.         1
  508.         0
  509.         720
  510.         0
  511.     [spc]
  512.         33
  513.         273
  514.         1
  515.         144
  516.         0
  517.         1
  518.         100
  519.     [brk]
  520.         4
  521.     [line]
  522.         8
  523.         0
  524.         1
  525.         0
  526.         1
  527.         1
  528.         1
  529.         10
  530.         10
  531.         1
  532.     [spec]
  533.         0
  534.         0
  535.         
  536.         0
  537.         1
  538.         1
  539.         0
  540.         0
  541.         0
  542.         0
  543.     [nfmt]
  544.         272
  545.         1
  546.         2
  547.         .
  548.         ,
  549.         $
  550.     First Indent
  551.     0
  552.     0
  553. [tag]
  554.     Line Above
  555.     12
  556.     [fnt]
  557.         Tms Rmn
  558.         240
  559.         0
  560.         49152
  561.     [algn]
  562.         1
  563.         1
  564.         0
  565.         0
  566.         0
  567.     [spc]
  568.         33
  569.         273
  570.         1
  571.         288
  572.         0
  573.         1
  574.         100
  575.     [brk]
  576.         4
  577.     [line]
  578.         5
  579.         0
  580.         1
  581.         0
  582.         1
  583.         2
  584.         1
  585.         92
  586.         10
  587.         1
  588.     [spec]
  589.         0
  590.         0
  591.         
  592.         0
  593.         1
  594.         1
  595.         0
  596.         0
  597.         0
  598.         0
  599.     [nfmt]
  600.         272
  601.         1
  602.         2
  603.         .
  604.         ,
  605.         $
  606.     Line Above
  607.     0
  608.     0
  609. [lay]
  610.     Standard
  611.     513
  612.     [rght]
  613.         15840
  614.         12240
  615.         1
  616.         1440
  617.         1440
  618.         1
  619.         1440
  620.         1440
  621.         2
  622.         1
  623.         0
  624.         1
  625.         1
  626.         2
  627.         1
  628.         1440
  629.         10800
  630.         5
  631.         1
  632.         720
  633.         1
  634.         1440
  635.         1
  636.         2880
  637.         1
  638.         4320
  639.         1
  640.         5760
  641.     [hrght]
  642.     [lyfrm]
  643.         1
  644.         11200
  645.         0
  646.         0
  647.         12240
  648.         1440
  649.         0
  650.         1
  651.         3
  652.         1 0 0 0 0 0 0
  653.         0
  654.         0
  655.         1
  656.     [frmlay]
  657.         1440
  658.         12240
  659.         1
  660.         1440
  661.         72
  662.         1
  663.         360
  664.         1440
  665.         0
  666.         1
  667.         0
  668.         1
  669.         1
  670.         0
  671.         1
  672.         1440
  673.         10800
  674.         0
  675.     [txt]
  676. >
  677.     [frght]
  678.     [lyfrm]
  679.         1
  680.         13248
  681.         0
  682.         14400
  683.         12240
  684.         15840
  685.         0
  686.         1
  687.         3
  688.         1 0 0 0 0 0 0
  689.         0
  690.         0
  691.         2
  692.     [frmlay]
  693.         15840
  694.         12240
  695.         1
  696.         1440
  697.         360
  698.         1
  699.         14472
  700.         1440
  701.         0
  702.         1
  703.         0
  704.         1
  705.         1
  706.         0
  707.         1
  708.         1440
  709.         10800
  710.         0
  711.     [txt]
  712. >
  713. [elay]
  714. [l1]
  715.     0
  716. [edoc]
  717. 'Install the menu item for scanning text into the current document.
  718.  
  719.  
  720. FUNCTION InitOmniscan()
  721.  
  722.  
  723. 'install the menu item
  724.  
  725. status = AddMenuItem(1,"&File","Scan Text...","omniscan.smm!Omniscan")
  726.  
  727.  
  728. END FUNCTION
  729.  
  730.  
  731. '**************************************************************************************
  732.  
  733.  
  734. 'Perform OCR and load it directly into the current Ami document. Since Ami Pro uses the
  735.  
  736. 'brainless method of unloading a DLL after each routine gets called, it is not possible
  737.  
  738. 'to break the DLL into component pieces that allow the macro-writer flexibility.
  739.  
  740. 'Instead, the only option is to make a single call to do everything, which doesn't give
  741.  
  742. 'the user much option to control anything if they want to. Such are the limits placed
  743.  
  744. 'upon products by short-sighted developers.....
  745.  
  746.  
  747. FUNCTION    Omniscan()
  748.  
  749.  
  750. 'define the full pathname of the temporary scratch file to use
  751.  
  752. tempfile = "c:\ocrtemp.sam"
  753.  
  754.  
  755. 'verify that there is an open document in AmiPro to put the scanned data into
  756.  
  757. Check = DLLLocate("Omniscan.dll","OcrFindCloseCommand","I")
  758.  
  759. status = DLLCall(Check)
  760.  
  761. if (status <<<;> 0) then
  762.  
  763.     Message("There is no open document to scan the text into")
  764.  
  765.     Goto finished
  766.  
  767.     endif
  768.  
  769.  
  770. 'establish link to the DLL routine to be used and perform Ocr; if failed,
  771.  
  772. 'report it
  773.  
  774. Perform = DLLLocate("Omniscan.dll","OcrPerformAll","ICC")
  775.  
  776. status = DLLCall(Perform,"{tempfile}","Ami Professional")
  777.  
  778. if (status <<<;> 0) and (status <<<;> -11) then
  779.  
  780.     Message("OCR did not complete properly.")
  781.  
  782.     endif
  783.  
  784.  
  785. 'if there is no results file, then we're done
  786.  
  787. Check = DLLLocate("Omniscan.dll","OcrFileCheck","IC")
  788.  
  789. status = DLLCall(Check,"{tempfile}")
  790.  
  791. if (status <<<;> 0) then
  792.  
  793.     Goto finished
  794.  
  795.     endif
  796.  
  797.  
  798. '***** the following is the method for inserting the OCR output file in AmiPro V1.2;
  799.  
  800. '***** this code should be uncommented-out and used if V1.2 is being used, with the
  801.  
  802. '***** V2.0 code further below being commented out
  803.  
  804.  
  805. 'save the current cursor position
  806.  
  807. 'MarkBookMark("OcrPaste",AddBookmark)
  808.  
  809.  
  810. 'go to the end of the document and save that position
  811.  
  812. 'Type("<[>CtrlEnd]")
  813.  
  814. 'MarkBookMark("OcrStart",AddBookmark)
  815.  
  816.  
  817. 'append the temporary file to the current file
  818.  
  819. 'Append("{tempfile}",AmiFile,0)
  820.  
  821.  
  822. 'mark from the start location to the end of the document and cut the text
  823.  
  824. 'MarkBookMark("OcrStart",FindBookmark)
  825.  
  826. 'Type("<[>CtrlShiftEnd]")
  827.  
  828. 'Cut()
  829.  
  830.  
  831. 'return to the original cursor position and paste the text back into the document
  832.  
  833. 'MarkBookMark("OcrPaste",FindBookmark)
  834.  
  835. 'Paste()
  836.  
  837.  
  838. 'delete the bookmarks
  839.  
  840. 'MarkBookMark("OcrPaste",DeleteBookmark)
  841.  
  842. 'MarkBookMark("OcrStart",DeleteBookmark)
  843.  
  844.  
  845. '***** the following is the method for inserting the OCR output file in AmiPro V2.0;
  846.  
  847. '***** if V1.2 of Ami Pro is being used, this code should be commented-out and not
  848.  
  849. '***** used, with the V1.2 code above being used instead
  850.  
  851.  
  852. 'insert the file into the current location of the current file
  853.  
  854. FileOpen("{tempfile}",9,"")
  855.  
  856.  
  857. '***** this next code section is required for both V1.2 and V2.0 (don't remove it)
  858.  
  859.  
  860. 'delete the temporary file via a function in the DLL
  861.  
  862. Cleanup = DLLLocate("Omniscan.dll","OcrDeleteFile","IC")
  863.  
  864. DLLCall(Cleanup,"{tempfile}")
  865.  
  866.  
  867. finished:
  868.  
  869.  
  870. END FUNCTION    
  871.  
  872. >
  873.  
  874. [Embedded]
  875. 00007804
  876. >
  877. [macsum] 2
  878. InitOmniscan 0 0 2 2
  879. Omniscan 94 0 6 18
  880. [macse]
  881. 14 InitOmniscan
  882. 0 516 1 "&File" "Scan Text..." "omniscan.smm!Omniscan"
  883. 13
  884. 8 1
  885. 6 0
  886. 15
  887. 9
  888. 14 Omniscan
  889. 7 "c:\ocrtemp.sam"
  890. 8 1
  891. 0 283 "Omniscan.dll" "OcrFindCloseCommand" "I"
  892. 13
  893. 8 2
  894. 0 284 "{2}"
  895. 13
  896. 8 3
  897. 6 3
  898. 5 0
  899. 18 1
  900. 11 00000214
  901. 0 3 "There is no open document to scan the text into"
  902. 10 00000616
  903. 0 283 "Omniscan.dll" "OcrPerformAll" "ICC"
  904. 13
  905. 8 4
  906. 0 284 "{4}" "{1}" "Ami Professional"
  907. 13
  908. 8 3
  909. 6 3
  910. 5 0
  911. 18 1
  912. 6 3
  913. 5 -11
  914. 18 1
  915. 1 1
  916. 11 00000404
  917. 0 3 "OCR did not complete properly."
  918. 0 283 "Omniscan.dll" "OcrFileCheck" "IC"
  919. 13
  920. 8 2
  921. 0 284 "{2}" "{1}"
  922. 13
  923. 8 3
  924. 6 3
  925. 5 0
  926. 18 1
  927. 11 00000525
  928. 10 00000616
  929. 2 102 1 "{1}" 9 ""
  930. 0 283 "Omniscan.dll" "OcrDeleteFile" "IC"
  931. 13
  932. 8 5
  933. 0 284 "{5}" "{1}"
  934. 6 0
  935. 15
  936. 9
  937. 00007829
  938.